using System;

namespace CSI.Directory.Core.Model
{
    [Serializable]
    public abstract class Base: Root
    {
       
        public string Name { get; set; }
        public DateTime CreateDate { get; set; }
        public DateTime ModifiedDate { get; set; }
    }

    public class Root
    {
        public int Id { get; set; }
       

        public override bool Equals(object obj)
        {
            if (obj == null) return false;

            if (GetType() != obj.GetType()) return false;


            var m = (Root)obj;


            return Equals(Id, m.Id);
        }

        public override int GetHashCode()
        {

            return Id * 7;

        }
    }
}